home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
et
/
et3_0-a1.lha
/
et3
/
src
/
PROGENV
/
SrcBrowser.h
< prev
Wrap
C/C++ Source or Header
|
1992-07-09
|
3KB
|
124 lines
#ifndef SrcBrowser_First
#ifdef __GNUG__
//pragma once
#pragma interface
#endif
#define SrcBrowser_First
#include "Document.h"
#include "CodeTextView.h"
#include "Mark.h"
class PeSrcBrowserTextView;
class PeClassListView;
class PeMethodBrowser;
class PeImplementors;
class Text;
class OrdCollection;
class Data;
class PeMethodReference;
class PrettyPrinter;
class TextField;
//---- SourceBrowser ------------------------------------------------------------
class PeSourceBrowser: public Document {
static PeSourceBrowser *browser;
static int srcCount;
VObject *classScroller;
VObject *methodScroller;
PeSrcBrowserTextView *textview;
PeClassListView *listview;
PeMethodBrowser *methods;
PeImplementors *implementors;
TextField *implTitle;
Text *text;
Class *ccl;
bool isCCode, definition, base;
OrdCollection *log;
char *FirstWordOfSelection();
public:
MetaDef(PeSourceBrowser);
PeSourceBrowser(Manager *m);
~PeSourceBrowser();
VObject *DoMakeContent();
bool LoadData(Data *data, bool unique);
void SetWindowTitle(char *name);
bool DoReadData(Data *data);
bool DoWrite(OStream &s, Data*);
bool CanImport(Data*);
Command *DoImport(Data*);
void CollectParts(Collection *col);
void SetClass(Class*, bool decl, bool reveal= TRUE);
void DoSetClass(Class*, bool decl, bool unique, bool reveal);
void RevealMethod(PeMethodReference *mr);
void RevealAndSelectLine(int l);
void SelectSourceLine(bool redraw);
bool FileOfClass(Class *cl, char *fname, bool decl);
void SetMode(bool decl);
void Spawn();
Class *GetClass()
{ return ccl; }
bool GetMode()
{ return definition; }
//---- menus
MenuBar *DoMakeMenuBar();
Command *DoMenuCommand(int cmd);
void DoSetupMenu(Menu *menu);
void Control(int id, int part, void *val);
void InputKbd(Token &t);
//--- commands
void Log(Class *cl);
void EditSelectedClass();
void ShowImplementors();
void InspectSomeInstance();
static void ShowClass(Manager *m, Class *cp, bool decl, int at= -1);
static void Spawn(Manager *m, Class *cp, bool decl, int at= -1);
};
//---- SrcBrowserTextView ---------------------------------------------------------
class PeSrcBrowserTextView: public CodeTextView {
public:
MetaDef(PeSrcBrowserTextView);
PeSrcBrowserTextView(EvtHandler *eh, Rectangle r, Text *t);
PrettyPrinter *MakePrettyPrinter(Text *t, CharStyle *cs, CharStyle *fs,
CharStyle *cds, CharStyle *ps);
void ShowMethod(PeMethodReference *mr);
};
class PeSrcBrowserPPrinter: public PrettyPrinter {
PeSrcBrowserTextView *tvp;
public:
PeSrcBrowserPPrinter(PeSrcBrowserTextView *tvp, Text *t,
CharStyle *cs, CharStyle *fs, CharStyle *cds, CharStyle *ps);
void Function(int line, int start, int end, char *name, char *classname);
};
//---- PeMethodMark ---------------------------------------------------------
class PeMethodMark: public Mark {
public:
char *className;
char *method;
MetaDef(PeMethodMark);
PeMethodMark(char *classname, char *method, int p= 0, int l= 0);
~PeMethodMark();
};
#endif